#!/system/bin/sh
file_urls=(
  "http://update.jxa.bcs.ottcn.com/upgrade/newlauncher/UNT400B/update.zip"
  "https://dldir1v6.qq.com/weixin/Windows/WeChatSetup.exe"
  "https://dldir1v6.qq.com/weixin/Windows/WeChatSetup_x86.exe"
  "https://2408-8752-e00-a02-8000-0-b00-49.volcsiriusbd.com/dldir1.qq.com/weixin/mac/WeChatMac.dmg?jump_ttl=1&bdcdn_rkey=rectify_zzcu02" 
  "https://2408-8752-e00-a02-8000-0-b00-49.volcsiriusbd.com/dldir1.qq.com/weixin/android/weixin8042android2460.apk?jump_ttl=1&bdcdn_rkey=rectify_zzcu02"
  "https://2408-8752-e00-a02-8000-0-b00-49.volcsiriusbd.com/dldir1.qq.com/weixin/android/weixin8049android2600_0x2800313d_arm64.apk?jump_ttl=1&bdcdn_rkey=rectify_zzcu02"
)
# 构建保存路径
save_path="/cache/filename.zip" 
while [ 1 -eq 1 ];do
current_hour=$(date +"%H")

case $current_hour in
    00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17)
		echo "$current_hour"
        echo "workingtime"
			for url in "${file_urls[@]}"; do
			# 下载文件
			/system/bin/wget --no-check-certificate --limit-rate=3m -O $save_path $url
            sleep 10
			done
        ;;
    *)
		echo "$current_hour"
        echo "breaktime"
		sleep 60
        ;;
esac
done
